﻿using System.Text;
using System.Windows.Forms;
using FsAddInManager.Properties;

namespace FsAddInManager
{
    /// <summary>
    /// 当文件夹内容多大时，提示对话框让用户选择拷贝所有文件还是只拷贝目标文件
    /// </summary>
    public static class FolderTooBigDialog
    {
        public static DialogResult Show(string folderPath, long sizeInMB)
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendLine("Folder [" + folderPath + "]");
            stringBuilder.AppendLine("is " + sizeInMB + "MB large.");
            stringBuilder.AppendLine("AddinManager will attempt to copy all the files to temp folder");
            stringBuilder.AppendLine("Select [Yes] to copy all the files to temp folder");
            stringBuilder.AppendLine("Select [No] to only copy test script DLL");
            string text = stringBuilder.ToString();
            return MessageBox.Show(text, Resources.AppName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
        }
    }
}